package com.bhawana.examples;

public class User {
	
	String name;
	String id;
	String email;
	String pass;
	
 User(){}
 
 public User(String n, String id,String e,String p)
     {this.name = n;
      this.id = id;
      this.email = e;
      this.pass = p;
      
     }
 
 public boolean saveUser()
 {  
	 String query = "INSERT INTO USER(name, email,id, password) VALUES('" +
		 		this.name +
	 		"','" +
		 		this.email +
		 		"','" +
		 		this.id +
		 		"','" +
		 		this.pass +
		 		"')";
		 
	 
		 System.out.println(query);
		 DbManager db = new DbManager();
		  return db.insert(query);
}
public boolean update(){
 String  q = "update user set name = 'uday' where password = 'maher';";
 System.out.println(q);
   DbManager db = new DbManager();
     return db.update(q);
}
public boolean delete(){
	 String  q = "delete  from user where password = 'maher';";
	 System.out.println(q);
	   DbManager db = new DbManager();
	     return db.delete(q);
	}
}
 

 
 


